{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "import pandas as pd\n",
    "import lxml.etree as le"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "_url = 'https://www.runoob.com/html/html-tutorial.html'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [],
   "source": [
    "name = \"//div[@class='design']/a/text()\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [],
   "source": [
    "href = \"//div[@class='design']/a/@href\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "content = requests.get(url = _url).content\n",
    "\n",
    "contentx= le.HTML(content)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [],
   "source": [
    "names = contentx.xpath(name)\n",
    "hrefs = contentx.xpath(href)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['\\n\\t\\t\\tHTML 教程\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 简介\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 编辑器\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 基础\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 元素\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 属性\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 标题\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 段落\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 文本格式化\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 链接\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 头部\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML CSS\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 图像\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 表格\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 列表\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 区块\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 布局\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 表单\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 框架\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 颜色\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 颜色名\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 颜色值\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 脚本\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 字符实体\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML URL\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 速查列表\\t\\t\\t',\n",
       " 'HTML 标签简写及全称',\n",
       " '\\n\\t\\t\\tHTML 总结\\t\\t\\t',\n",
       " '\\n\\t\\t\\tXHTML 简介\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 教程\\t\\t\\t',\n",
       " ' HTML5 浏览器支持 ',\n",
       " '\\n\\t\\t\\tHTML5 新元素\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 Canvas\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 内联 SVG\\t\\t\\t',\n",
       " ' HTML5 MathML ',\n",
       " '\\n\\t\\t\\tHTML5 拖放\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 地理定位\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 Video(视频)\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 Audio(音频)\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 Input 类型\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 表单元素\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 表单属性\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 语义元素\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 Web 存储\\t\\t\\t',\n",
       " ' HTML5 Web SQL ',\n",
       " '\\n\\t\\t\\tHTML5 应用程序缓存\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 Web Workers\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML5 SSE\\t\\t\\t',\n",
       " ' HTML5 WebSocket ',\n",
       " ' HTML5 测验 ',\n",
       " 'HTML(5) 代码规范 ',\n",
       " '\\n\\t\\t\\tHTML 媒体(Media)\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 插件\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 音频(Audio)\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 视频（Video）播放\\t\\t\\t',\n",
       " '\\n\\t\\t\\tHTML 实例\\t\\t\\t',\n",
       " '\\r\\nHTML 标签列表(字母排序)\\t',\n",
       " '\\r\\nHTML 标签列表（功能排序）\\t',\n",
       " '\\r\\nHTML 属性\\t',\n",
       " '\\r\\nHTML 事件\\t',\n",
       " '\\r\\nHTML 画布\\t',\n",
       " '\\r\\nHTML 音频/视频\\t',\n",
       " '\\r\\nHTML 有效DOCTYPES\\t',\n",
       " '\\r\\nHTML 颜色名\\t',\n",
       " '\\r\\nHTML 拾色器\\t',\n",
       " '\\r\\nHTML 字符集\\t',\n",
       " '\\r\\nHTML ASCII\\t',\n",
       " '\\r\\nHTML ISO-8859-1\\t',\n",
       " '\\r\\nHTML 符号\\t',\n",
       " '\\r\\nHTML URL 编码\\t',\n",
       " '\\r\\nHTML 语言代码\\t',\n",
       " '\\r\\nHTTP 消息\\t',\n",
       " '\\r\\nHTTP 方法\\t',\n",
       " '\\r\\n键盘快捷键\\t']"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['/html/html-tutorial.html',\n",
       " '/html/html-intro.html',\n",
       " '/html/html-editors.html',\n",
       " '/html/html-basic.html',\n",
       " '/html/html-elements.html',\n",
       " '/html/html-attributes.html',\n",
       " '/html/html-headings.html',\n",
       " '/html/html-paragraphs.html',\n",
       " '/html/html-formatting.html',\n",
       " '/html/html-links.html',\n",
       " '/html/html-head.html',\n",
       " '/html/html-css.html',\n",
       " '/html/html-images.html',\n",
       " '/html/html-tables.html',\n",
       " '/html/html-lists.html',\n",
       " '/html/html-blocks.html',\n",
       " '/html/html-layouts.html',\n",
       " '/html/html-forms.html',\n",
       " '/html/html-iframes.html',\n",
       " '/html/html-colors.html',\n",
       " '/html/html-colornames.html',\n",
       " '/html/html-colorvalues.html',\n",
       " '/html/html-scripts.html',\n",
       " '/html/html-entities.html',\n",
       " '/html/html-url.html',\n",
       " '/html/html-quicklist.html',\n",
       " '/html/html-tag-name.html',\n",
       " '/html/html-summary.html',\n",
       " '/html/html-xhtml.html',\n",
       " '/html/html5-intro.html',\n",
       " 'html5-browsers.html',\n",
       " '/html/html5-new-element.html',\n",
       " '/html/html5-canvas.html',\n",
       " '/html/html5-svg.html',\n",
       " 'html5-mathml.html',\n",
       " '/html/html5-draganddrop.html',\n",
       " '/html/html5-geolocation.html',\n",
       " '/html/html5-video.html',\n",
       " '/html/html5-audio.html',\n",
       " '/html/html5-form-input-types.html',\n",
       " '/html/html5-form-elements.html',\n",
       " '/html/html5-form-attributes.html',\n",
       " '/html/html5-semantic-elements.html',\n",
       " '/html/html5-webstorage.html',\n",
       " 'html5-web-sql.html',\n",
       " '/html/html5-app-cache.html',\n",
       " '/html/html5-webworkers.html',\n",
       " '/html/html5-serversentevents.html',\n",
       " '/html/html5-websocket.html',\n",
       " '/quiz/html5-quiz.html',\n",
       " '/html/html5-syntax.html',\n",
       " '/html/html-media.html',\n",
       " '/html/html-object.html',\n",
       " '/html/html-sounds.html',\n",
       " '/html/html-videos.html',\n",
       " '/html/html-examples.html',\n",
       " '/tags/html-reference.html',\n",
       " '/tags/ref-byfunc.html',\n",
       " '/tags/ref-standardattributes.html',\n",
       " '/tags/ref-eventattributes.html',\n",
       " '/tags/ref-canvas.html',\n",
       " '/tags/ref-av-dom.html',\n",
       " '/tags/html-elementsdoctypes.html',\n",
       " '/tags/html-colorname.html',\n",
       " '/tags/html-colorpicker.html',\n",
       " '/charsets/html-charsets.html',\n",
       " '/tags/html-ascii.html',\n",
       " '/tags/ref-entities.html',\n",
       " '/tags/html-symbols.html',\n",
       " '/tags/html-urlencode.html',\n",
       " '/tags/html-language-codes.html',\n",
       " '/tags/html-httpmessages.html',\n",
       " '/tags/html-httpmethods.html',\n",
       " '/tags/html-keyboardshortcuts.html']"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hrefs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['HTML 教程',\n",
       " 'HTML 简介',\n",
       " 'HTML 编辑器',\n",
       " 'HTML 基础',\n",
       " 'HTML 元素',\n",
       " 'HTML 属性',\n",
       " 'HTML 标题',\n",
       " 'HTML 段落',\n",
       " 'HTML 文本格式化',\n",
       " 'HTML 链接',\n",
       " 'HTML 头部',\n",
       " 'HTML CSS',\n",
       " 'HTML 图像',\n",
       " 'HTML 表格',\n",
       " 'HTML 列表',\n",
       " 'HTML 区块',\n",
       " 'HTML 布局',\n",
       " 'HTML 表单',\n",
       " 'HTML 框架',\n",
       " 'HTML 颜色',\n",
       " 'HTML 颜色名',\n",
       " 'HTML 颜色值',\n",
       " 'HTML 脚本',\n",
       " 'HTML 字符实体',\n",
       " 'HTML URL',\n",
       " 'HTML 速查列表',\n",
       " 'HTML 标签简写及全称',\n",
       " 'HTML 总结',\n",
       " 'XHTML 简介',\n",
       " 'HTML5 教程',\n",
       " 'HTML5 浏览器支持',\n",
       " 'HTML5 新元素',\n",
       " 'HTML5 Canvas',\n",
       " 'HTML5 内联 SVG',\n",
       " 'HTML5 MathML',\n",
       " 'HTML5 拖放',\n",
       " 'HTML5 地理定位',\n",
       " 'HTML5 Video(视频)',\n",
       " 'HTML5 Audio(音频)',\n",
       " 'HTML5 Input 类型',\n",
       " 'HTML5 表单元素',\n",
       " 'HTML5 表单属性',\n",
       " 'HTML5 语义元素',\n",
       " 'HTML5 Web 存储',\n",
       " 'HTML5 Web SQL',\n",
       " 'HTML5 应用程序缓存',\n",
       " 'HTML5 Web Workers',\n",
       " 'HTML5 SSE',\n",
       " 'HTML5 WebSocket',\n",
       " 'HTML5 测验',\n",
       " 'HTML(5) 代码规范',\n",
       " 'HTML 媒体(Media)',\n",
       " 'HTML 插件',\n",
       " 'HTML 音频(Audio)',\n",
       " 'HTML 视频（Video）播放',\n",
       " 'HTML 实例',\n",
       " 'HTML 标签列表(字母排序)',\n",
       " 'HTML 标签列表（功能排序）',\n",
       " 'HTML 属性',\n",
       " 'HTML 事件',\n",
       " 'HTML 画布',\n",
       " 'HTML 音频/视频',\n",
       " 'HTML 有效DOCTYPES',\n",
       " 'HTML 颜色名',\n",
       " 'HTML 拾色器',\n",
       " 'HTML 字符集',\n",
       " 'HTML ASCII',\n",
       " 'HTML ISO-8859-1',\n",
       " 'HTML 符号',\n",
       " 'HTML URL 编码',\n",
       " 'HTML 语言代码',\n",
       " 'HTTP 消息',\n",
       " 'HTTP 方法',\n",
       " '键盘快捷键']"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "for i in range(len(names)):\n",
    "    names[i] = names[i].strip()\n",
    "names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['https://www.runoob.com/html/html-tutorial.html',\n",
       " 'https://www.runoob.com/html/html-intro.html',\n",
       " 'https://www.runoob.com/html/html-editors.html',\n",
       " 'https://www.runoob.com/html/html-basic.html',\n",
       " 'https://www.runoob.com/html/html-elements.html',\n",
       " 'https://www.runoob.com/html/html-attributes.html',\n",
       " 'https://www.runoob.com/html/html-headings.html',\n",
       " 'https://www.runoob.com/html/html-paragraphs.html',\n",
       " 'https://www.runoob.com/html/html-formatting.html',\n",
       " 'https://www.runoob.com/html/html-links.html',\n",
       " 'https://www.runoob.com/html/html-head.html',\n",
       " 'https://www.runoob.com/html/html-css.html',\n",
       " 'https://www.runoob.com/html/html-images.html',\n",
       " 'https://www.runoob.com/html/html-tables.html',\n",
       " 'https://www.runoob.com/html/html-lists.html',\n",
       " 'https://www.runoob.com/html/html-blocks.html',\n",
       " 'https://www.runoob.com/html/html-layouts.html',\n",
       " 'https://www.runoob.com/html/html-forms.html',\n",
       " 'https://www.runoob.com/html/html-iframes.html',\n",
       " 'https://www.runoob.com/html/html-colors.html',\n",
       " 'https://www.runoob.com/html/html-colornames.html',\n",
       " 'https://www.runoob.com/html/html-colorvalues.html',\n",
       " 'https://www.runoob.com/html/html-scripts.html',\n",
       " 'https://www.runoob.com/html/html-entities.html',\n",
       " 'https://www.runoob.com/html/html-url.html',\n",
       " 'https://www.runoob.com/html/html-quicklist.html',\n",
       " 'https://www.runoob.com/html/html-tag-name.html',\n",
       " 'https://www.runoob.com/html/html-summary.html',\n",
       " 'https://www.runoob.com/html/html-xhtml.html',\n",
       " 'https://www.runoob.com/html/html5-intro.html',\n",
       " 'https://www.runoob.comhtml5-browsers.html',\n",
       " 'https://www.runoob.com/html/html5-new-element.html',\n",
       " 'https://www.runoob.com/html/html5-canvas.html',\n",
       " 'https://www.runoob.com/html/html5-svg.html',\n",
       " 'https://www.runoob.comhtml5-mathml.html',\n",
       " 'https://www.runoob.com/html/html5-draganddrop.html',\n",
       " 'https://www.runoob.com/html/html5-geolocation.html',\n",
       " 'https://www.runoob.com/html/html5-video.html',\n",
       " 'https://www.runoob.com/html/html5-audio.html',\n",
       " 'https://www.runoob.com/html/html5-form-input-types.html',\n",
       " 'https://www.runoob.com/html/html5-form-elements.html',\n",
       " 'https://www.runoob.com/html/html5-form-attributes.html',\n",
       " 'https://www.runoob.com/html/html5-semantic-elements.html',\n",
       " 'https://www.runoob.com/html/html5-webstorage.html',\n",
       " 'https://www.runoob.comhtml5-web-sql.html',\n",
       " 'https://www.runoob.com/html/html5-app-cache.html',\n",
       " 'https://www.runoob.com/html/html5-webworkers.html',\n",
       " 'https://www.runoob.com/html/html5-serversentevents.html',\n",
       " 'https://www.runoob.com/html/html5-websocket.html',\n",
       " 'https://www.runoob.com/quiz/html5-quiz.html',\n",
       " 'https://www.runoob.com/html/html5-syntax.html',\n",
       " 'https://www.runoob.com/html/html-media.html',\n",
       " 'https://www.runoob.com/html/html-object.html',\n",
       " 'https://www.runoob.com/html/html-sounds.html',\n",
       " 'https://www.runoob.com/html/html-videos.html',\n",
       " 'https://www.runoob.com/html/html-examples.html',\n",
       " 'https://www.runoob.com/tags/html-reference.html',\n",
       " 'https://www.runoob.com/tags/ref-byfunc.html',\n",
       " 'https://www.runoob.com/tags/ref-standardattributes.html',\n",
       " 'https://www.runoob.com/tags/ref-eventattributes.html',\n",
       " 'https://www.runoob.com/tags/ref-canvas.html',\n",
       " 'https://www.runoob.com/tags/ref-av-dom.html',\n",
       " 'https://www.runoob.com/tags/html-elementsdoctypes.html',\n",
       " 'https://www.runoob.com/tags/html-colorname.html',\n",
       " 'https://www.runoob.com/tags/html-colorpicker.html',\n",
       " 'https://www.runoob.com/charsets/html-charsets.html',\n",
       " 'https://www.runoob.com/tags/html-ascii.html',\n",
       " 'https://www.runoob.com/tags/ref-entities.html',\n",
       " 'https://www.runoob.com/tags/html-symbols.html',\n",
       " 'https://www.runoob.com/tags/html-urlencode.html',\n",
       " 'https://www.runoob.com/tags/html-language-codes.html',\n",
       " 'https://www.runoob.com/tags/html-httpmessages.html',\n",
       " 'https://www.runoob.com/tags/html-httpmethods.html',\n",
       " 'https://www.runoob.com/tags/html-keyboardshortcuts.html']"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "urls = []\n",
    "for href in hrefs:\n",
    "    urls.append('https://www.runoob.com'+href)\n",
    "urls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>label</th>\n",
       "      <th>url</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>HTML 教程</td>\n",
       "      <td>https://www.runoob.com/html/html-tutorial.html</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>HTML 简介</td>\n",
       "      <td>https://www.runoob.com/html/html-intro.html</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HTML 编辑器</td>\n",
       "      <td>https://www.runoob.com/html/html-editors.html</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>HTML 基础</td>\n",
       "      <td>https://www.runoob.com/html/html-basic.html</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>HTML 元素</td>\n",
       "      <td>https://www.runoob.com/html/html-elements.html</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>HTML URL 编码</td>\n",
       "      <td>https://www.runoob.com/tags/html-urlencode.html</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>HTML 语言代码</td>\n",
       "      <td>https://www.runoob.com/tags/html-language-code...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>HTTP 消息</td>\n",
       "      <td>https://www.runoob.com/tags/html-httpmessages....</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>HTTP 方法</td>\n",
       "      <td>https://www.runoob.com/tags/html-httpmethods.html</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>键盘快捷键</td>\n",
       "      <td>https://www.runoob.com/tags/html-keyboardshort...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>74 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          label                                                url\n",
       "0       HTML 教程     https://www.runoob.com/html/html-tutorial.html\n",
       "1       HTML 简介        https://www.runoob.com/html/html-intro.html\n",
       "2      HTML 编辑器      https://www.runoob.com/html/html-editors.html\n",
       "3       HTML 基础        https://www.runoob.com/html/html-basic.html\n",
       "4       HTML 元素     https://www.runoob.com/html/html-elements.html\n",
       "..          ...                                                ...\n",
       "69  HTML URL 编码    https://www.runoob.com/tags/html-urlencode.html\n",
       "70    HTML 语言代码  https://www.runoob.com/tags/html-language-code...\n",
       "71      HTTP 消息  https://www.runoob.com/tags/html-httpmessages....\n",
       "72      HTTP 方法  https://www.runoob.com/tags/html-httpmethods.html\n",
       "73        键盘快捷键  https://www.runoob.com/tags/html-keyboardshort...\n",
       "\n",
       "[74 rows x 2 columns]"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.DataFrame({'label':names,'url':urls})\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "data.to_excel('/Users/jiabaohuang/Desktop/作业/阶段五模块六作业.xlsx')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
